package com.fdb.efp.console.api.rest.sed;

import com.fdb.basic.framework.core.constant.ResponseData;
import com.fdb.basic.framework.web.controller.AbstractController;
import com.fdb.efp.console.service.facade.SRoleDataRuleService;
import com.fdb.efp.console.service.facade.TaxRetailerInfoService;
import com.fdb.efp.console.service.vo.TaxRetailerInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * Controller：个体户信息表
 * @author ligm
 * @date 2019-04-29 
 */
@RestController
@RequestMapping("/api")
public class TaxRetailerInfoController extends AbstractController  {
	
	@Autowired
	@Qualifier("taxRetailerInfoService")
	private TaxRetailerInfoService taxRetailerInfoService;
    
	@Autowired
	@Qualifier("sRoleDataRuleService")
	private SRoleDataRuleService sRoleDataRuleService;

    /**
	 * 新增数据 
	 * @param inTaxRetailerInfoVo
	 * @return 
	 */
    @PostMapping(value="/tax/retailer/info")
	public @ResponseBody ResponseData<Integer> insertTaxRetailerInfo(@RequestBody TaxRetailerInfoVO inTaxRetailerInfoVo) {
        
		
		

		int outputVo = taxRetailerInfoService.insertTaxRetailerInfo(inTaxRetailerInfoVo);
		return getResponseData(outputVo);	
	}

    /**
	 * 根据主键删除信息 
	 * @param inTaxRetailerInfoVo
	 * @return 
	 */
	@DeleteMapping(value="/tax/retailer/info")
	public @ResponseBody ResponseData<Integer> deleteByPk(@RequestBody TaxRetailerInfoVO inTaxRetailerInfoVo) {
        
		
		

		int outputVo = taxRetailerInfoService.deleteByPk(inTaxRetailerInfoVo);
		return getResponseData(outputVo);
	}

    /**
	 * 根据主键更新信息 
     * @param inTaxRetailerInfoVo
	 * @return 
	 */
	@PutMapping(value="/tax/retailer/info")
	public @ResponseBody ResponseData<Integer> updateByPk(@RequestBody TaxRetailerInfoVO inTaxRetailerInfoVo) {
        
		
		

		int outputVo = taxRetailerInfoService.updateByPk(inTaxRetailerInfoVo);
		return getResponseData(outputVo);
	}

    /**
	 * 根据主键查询详情 
     * @param taxRetailerInfo
	 * @return 
	 */
	@GetMapping(value="/tax/retailer/info")
	public @ResponseBody ResponseData<TaxRetailerInfoVO> queryByPk() {	
        
		
		

		TaxRetailerInfoVO inVo = new TaxRetailerInfoVO();
		TaxRetailerInfoVO outputVo = taxRetailerInfoService.queryByPk(inVo);
		return getResponseData(outputVo);
	} 

    /**
	 * 列表数据查询 
	 * @param taxRetailerInfo
	 * @return 
	 */
	@RequestMapping(value="/tax/retailer/infos", method=RequestMethod.POST)
	public @ResponseBody ResponseData<List<TaxRetailerInfoVO>> queryTaxRetailerInfoAll(TaxRetailerInfoVO vo) {
        
		
		

		List<TaxRetailerInfoVO> outputVo = null;
		setUserInfoToVO(vo);

		return getResponseData(outputVo);	
	}
}
